Skip to content

feat(bfv)!: size the BFV parameter search for 45 parties - #2542

Open
ctrlc03 wants to merge 3 commits into
large/c4-per-limbfrom
large/params-n45
Open

ctrlc03 wants to merge 3 commits into
large/c4-per-limbfrom
large/params-n45

Conversation

@ctrlc03

@ctrlc03 ctrlc03 commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

What and why

Split from #2398 (Zara's work). Stacked on #2533 (large/c4-per-limb); review that one first.

Replaces #2535, which GitHub auto-merged into a stack branch during the restack; its review
threads stay there.

The BFV parameter search was sized for 19 parties (insecure 20/19). The Large committee needs
correct noise bounds for 45 parties, so this raises the search to n = 45 before any committee is
defined.

  • SEARCH_N is 45 for the secure and insecure searches, and the error-1 variance constants and the
    builder test vectors follow the new search result.
  • The regenerated Noir threshold configs, BfvProtocol.sol and crypto-config.json carry the new
    parameter hashes (insecure 0x2898f8a9…a844, secure 0x4f402598…08c3) and the config IDs that
    derive from them. bfv_protocol.json and bfv_profiles.json are recomputed independently with
    ethers, not copied from the generator.
  • The search tests pin n = 20 and n = 19 where they test the old size. The crate README, the
    witness sample test and the indexer's fake Interfold fixture follow.
  • The tuples keep registry indices 0 and 2 here. docs/architecture/upgrades.md records why live
    registries cannot take them there; feat(bfv)!: register the 45-party parameter sets at indices 3 and 4 #2539 moves them to indices 3 and 4.
  • No committee is added here: the committee set is unchanged.

Verification

Static checks only; CI runs the tests.

  • cargo check --workspace --lib --bins, cargo check --all-targets for the affected crates,
    cargo fmt --check.
  • nargo check of lib, bin/config, bin/threshold and bin/dkg with the secure parameters,
    scripts/circuits/lint.sh, node scripts/blueprint/check.mjs, pnpm check:bindings,
    node scripts/circuits/crypto-config.mjs --check --sources, prettier.
  • The fixtures were recomputed with ethers and match the Rust generator's output.

Compatibility

Breaking within the unreleased protocol-9 cutover (no separate counter change): every pair's
parameter hash and cryptoConfigId change, and with them the verification keys and verifiers.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
interfold-dashboard Ready Ready Preview Nov 20, 2026 9:49am UTC
interfold-docs Ready Ready Preview Nov 20, 2026 9:49am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f7c2a0e and 9365aa1.

Files selected for processing: 14

  • circuits/lib/src/configs/insecure/threshold.nr
  • circuits/lib/src/configs/secure/threshold.nr
  • circuits/lib/src/configs/synchronized/sync_insecure_64.nr
  • crates/bfv/params/README.md
  • crates/bfv/params/src/builder.rs
  • crates/bfv/params/src/constants.rs
  • crates/bfv/params/src/search/bfv.rs
  • crates/bfv/params/tests/fixtures/bfv_profiles.json
  • crates/bfv/params/tests/fixtures/bfv_protocol.json
  • crates/evm/indexer/tests/fixtures/fake_interfold.sol
  • crates/zk/witness/tests/user_data_encryption_samples.rs
  • docs/architecture/upgrades.md
  • packages/interfold-contracts/contracts/lib/BfvProtocol.sol
  • packages/interfold-contracts/crypto-config.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ctrlc03
ctrlc03 added this pull request to stack #2543 November 20, 2026 09:22
zahrajavar and others added 3 commits November 20, 2026 09:38
Split from #2398. Raise the secure-8192 and insecure-64 search to n = 45
(rerun of search_params, the insecure one with lambda 2 and 12-bit
primes), so one parameter set serves every committee up to the large
one. The moduli are unchanged; the threshold error1 variance grows
(secure B_Enc 518814677073081139200, insecure 460800), so the smudging
and user-encryption e0 bounds grow, and the insecure e0 bound gains one
bit. Correctness margins at n = 45: secure 2.07 bits, insecure 2.52 bits.

Both presets' parameter hashes and every configuration identity change
(BfvProtocol.sol, crypto-config.json and the independently recomputed
ethers fixtures). Compiled artifacts, the VK catalogue and the BFV
verifiers are regenerated separately.
…xture

The indexer fixture contract returns the insecure BFV crypto config ID. The ID
changed with the 45-party parameters, so the fixture follows the value in
bfv_protocol.json.
The 45-party search changes the threshold tuples at registry indices 0 and 2.
Registration is append-only, and Mainnet index 2 and Sepolia indices 0 and 2
already hold the v0.19 tuples, so those deployments cannot take the new bytes
in place. State the consequences for requests, nodes and the indexer, and the
two rollout options. The decision stays open for human review.

This branch was successfully deployed

2 active deployments
Preview – interfold-docs — 9365aa19 Deployed Nov 20, 2026 by vercel[bot]
Preview – interfold-dashboard — 9365aa19 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants